<?php
declare (strict_types = 1);
namespace app\user\service\user;

use app\common\service\BaseService;
use think\facade\Request;
use app\user\logic\user\Follow as FollowLogic;

/**
 * 关注接口
 */
class Follow extends BaseService
{

    public function getFollowList()
    {
        $param = Request::get();
        $data  = app(FollowLogic::class)->getFollowList($param);
        
        return $this->parseToData($data, 1, '获取成功');
    }

    public function follow()
    {
        $param = Request::post();
        $re    = app(FollowLogic::class)->follow($param);
        return $this->parseToData($re, 1, '关注成功');
    }

    public function unfollow()
    {
        $param = Request::delete();
        $re    = app(FollowLogic::class)->unfollow($param);
        return $this->parseToData($re, 1, '取关成功');
    }

    public function getFollower()
    {
        $param = Request::get();
        $data  = app(FollowLogic::class)->getFollower($param);

        return $this->parseToData($data, 1, '获取成功');
    }
}
